  <script lang="ts">
import { defineComponent } from 'vue';

export default defineComponent({
     name: 'Home',
  // 组件选项
    methods: {
    goToAbout() {
      this.$router.push('/about')
    },
  },
});
</script>  
 
<template>
  <h2>HomeView</h2>
  <button @click="goToAbout">Go to About</button>
</template>